<?php
$item = $productDetails[0];
$select_option = "";
$div_desc = "";
?>
<button aria-hidden="true" data-dismiss="modal" class="close" type="button"> × </button>
<div class="col-lg-5 col-md-5 col-sm-5  col-xs-12">
	<!-- product Image -->
	<div class="main-image  col-lg-12 no-padding style3">
		<a class="product-largeimg-link" href="product-details.html">
			<img src="images/zoom/zoom1.jpg" class="img-responsive product-largeimg" alt="img">
		</a>
	</div>
	<!--/.main-image-->

	<div class="modal-product-thumb">
		<?php foreach($productDetails as $index=>$itm) { ?>
		<a class="thumbLink selected">
			<img data-large="<?php echo product_upload($itm->image, $product->shop_image_folder); ?>" src="<?php echo product_upload($itm->image, $product->shop_image_folder); ?>" alt='<?php echo $itm->getCode(); ?>'/>
		</a>
		<?php
            $div_desc .= '<p>' . $itm->getDescription() . '</p>';

            $selected_option = $itm->getIsAvatar()==ON?"selected='selected'":"";
            $select_option .= "<option {$selected_option}>".$itm->getCode()."</option>";
        ?>
		<?php } ?>
	</div> <!--/.modal-product-thumb-->
</div> <!--/ product Image-->

<div class="col-lg-7 col-md-7 col-sm-7 col-xs-12 modal-details no-padding">
	<div class="modal-details-inner">
		<form has-validate id="frm-product-detail" method="post" action="<?php echo page_url('cart/direct-push', array('ref'=>$ref)); ?>">
			<input type="hidden" id="product-id" name="cart[id]" value="<?php echo $item->getId(); ?>" />
			<input type="hidden" id="product-price" name="cart[price]" value="<?php echo $item->getPriceNew(); ?>" /><h1 class="product-title"><?php echo $product->title; ?></h1>
			<h3 class="product-code">Mã sản phẩm : <?php echo $item->getCode(); ?></h3>
			<div class="product-price">
				<span class="price-sales"> <?php echo currency_format($item->getPriceNew()); ?></span>
				<span class="price-standard"><?php echo currency_format($item->getPriceOld()); ?></span>
			</div>
			<div class="details-description">
				<?php echo $div_desc; ?>
			</div>
			<div class="productFilter productFilterLook2">
                <select class="form-control w100"><?php echo $select_option; ?></select>
                <br />
				<input autocomplete="off" id="product-qty" name="cart[qty]" type="text" class="form-control w100 text-right" value="1"/>
			</div>
			<!-- productFilter -->
			<div id="flg_message" class="alert alert-success hidden mgt-10"></div>
			<div class="cart-actions">
				<div class="addto">
					<button class="btn btn-info btn-fill" role="button"><i class="fa fa-check-circle"></i>&nbsp; Mua ngay</button>
					<button data-href="<?php echo page_url('cart/push'); ?>" id="btn-add-to-cart" type="button" class="btn btn-info"><i class="fa fa-shopping-cart"></i> Cho vào giỏ hàng</button>
				</div>
				<div style="clear:both"></div>
			</div>
			<!--/.cart-actions-->

			<div class="product-share clearfix">
				<p> CHIA SẺ </p>
				<div class="socialIcon">
					<a href="#"> <i class="fa fa-facebook"></i>
					</a>
					<a href="#"> <i class="fa fa-twitter"></i>
					</a>
					<a href="#"> <i class="fa fa-google-plus"></i>
					</a>
					<a href="#"> <i class="fa fa-pinterest"></i>
					</a>
				</div>
			</div>
			<!--/.product-share-->
		</form>
	</div><!--/.modal-details-inner-->
</div>
<!--/.modal-details-->
<div class="clear"></div>